# curl

CURL_FILE := curl-7.49.1.zip

# CURL_URL :=  http://curl.haxx.se/download/$(CURL_FILE)
#$(TARBALLS)/$(CURL_FILE):
#	$(call download,$(CURL_URL))

.sum-curl: $(CURL_FILE)

curl: $(CURL_FILE) .sum-curl
	$(UNPACK)
	$(UPDATE_AUTOCONFIG)
	$(MOVE)

DEPS_curl = zlib $(DEPS_zlib)

DEPS_curl = openssl $(DEPS_openssl)

ifdef HAVE_LINUX
configure_option=--without-libidn --without-librtmp
endif

ifdef HAVE_TVOS
configure_option+=--disable-ntlm-wb
endif

.curl: curl .zlib .openssl
	$(RECONF)
	cd $< && $(HOSTVARS_PIC) ./configure $(HOSTCONF) \
		--with-ssl=$(PREFIX) \
		--with-zlib \
		--enable-ipv6 \
		--disable-ldap \
		$(configure_option)
# ifdef HAVE_ANDROID
# 	$(APPLY) $(SRC)/curl/android.patch
# endif
	cd $< && $(MAKE) install
	touch $@
